<style>
.right-c p img {
    max-width: 880px;
}
</style>
<div class="head-c">
		<nav class="navbar navbar-default" >
			<div class="container">
				<div class="navbar-header">
					<a  class="navbar-brand" style="padding:2px 10px" href="javascript:;" ng-click="access_json('home.welcome/')">
						<div class="ng-logo">
							<img src="{{pagedata.logo || '../core/resource/images/ng-logo.png'}}" class="pull-left">
						</div>
					</a>
				</div>
				<div class="header-r">
					<ul class="top_nav">
							<li class="top_nav_item" style="padding-top:3px"><a href="javascript:;" ng-click="access_json('home.welcome/')" >首页</a></li>
							<li class="top_nav_item" ng-class="{'active':pagedata.type==1}" style="padding-top:3px"><a href="./index.php?plugin=core&action=article.show&type=0&nosession=1" >使用手册</a></li>
					</ul>
				</div>
			</div>
		</nav>
</div>
<div class="main container-fill">
	<div class="container">
	  <div class="panel panel-c">
		<div class="panel-heading">
			<span class="font-lg"><i class="fa fa-file-code-o"></i> {{ifelse(pagedata.type==1,'使用手册')}}</span>
			<span class="pull-right" style="margin-right:0px">
				<div class="input-group form-group" style="width: 400px;">
				<input type="text" ng-model="pagedata.keyword" class="form-control" placeholder="搜索关键字"/>
				<span class="input-group-btn"><button id="submit" ng-click="sousuo(pagedata.keyword)" class="btn btn-default"><i class="fa fa-search" style="margin-right: 1px;font-size: 14px;"></i></button></span>
				</div>			
			</span>
		</div>
		<div class="panel-body clearfix c-panel-body">
			<div class="left-c">
			  <div class="left-c-content">
				  <div ng-repeat="group in pagedata.groups" class="panel-c">
					<div class="panel-heading" ng-click="toogle(group,'show')">
						<span class="no-collapse">{{group.title}}<i class="fa fa-chevron-circle-down pull-right setting" style="padding-right:0px;color:#ccc"></i></span>
					</div>
					<ul class="list-group in" ng-show="group.show!=0">
						<li class="list-group-item menu" ng-repeat="article in group.articles" ng-class="{'active':pagedata.article_show_id==article.id}">
							<a ng-click="show_article(article)" style="font-size:13px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;" href="javascript:;">{{article.title}}</a>
						</li>
					</ul>
				  </div>
			  </div>
			</div>
			<div class="right-c" style="padding:12px 0 0;margin:0 30px;max-width:900px" ng-show="pagedata.show=='article'" name="mainbody" >
				<h3 id="title">{{pagedata.title}} <span class="clink"><a ng-click="clip(pagedata.title+'：'+pagedata.url)" href="" >[复制链接]</a></span></h3>
				
				<div class="article_box" ng-bind-html="trust(pagedata.article_show)">
				
				</div>
			</div>
			<div class="right-c" style="padding:12px 0 0;margin:0 32px;max-width:900px" ng-show="pagedata.show=='query'" name="mainbody" >
				<div style="font-size: 15px;">
					<a id="goback" href="javascript:;" ng-click="pagedata.show='article'">
						<i class="fa fa-angle-left"></i>
						<span>返回</span>
					</a>
					<p id="count" class="pull-right">{{pagedata.total}}条结果"{{pagedata.keyword}}"</p>
				</div>
				<div class="search_result_box">
					<ul id="list" class="result_list">	
						<li class="result_item" ng-repeat="res in pagedata.results" ng-click="show_article(res)">	
							<a class="result_item_link" href="" target="_blank">
								<h3 class="result_title" ng-bind-html="trust(res.title1)">
									
								</h3>
								<p class="result_content" ng-bind-html="trust(res.content)">
									
								</p>
							</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
	  </div>
	</div>
</div>
<script>
window.scope.sousuo=function(keyword){
	
	window.scope.post({},'sousuo','nosession=1&keyword='+keyword,function(res){
		//alert(keyword);
		var total=0;
		angular.forEach(res, function(m,index) {
			total++;
		});
		window.scope.pagedata.results=res;
		window.scope.pagedata.total=total-1;
		window.scope.pagedata.show='query';
		window.scope.$apply();
	});
}
window.scope.show_article=function(article){
	scroll(0,0);
	window.scope.post({},'show','nosession=1&id='+article.id,function(res){
		//alert(keyword);
		window.scope.pagedata.article_show=res;
		window.scope.pagedata.show='article';
		window.scope.pagedata.title=article.title;
		window.scope.pagedata.url=article.url;
		window.scope.$apply();
	});
}

</script>